import request from '@/utils/request'

// 统一前缀
var prefix = '/courseService'

//条件查询科目
export function lookSubjectAll() {
  return request({
    url: `${prefix}/subject/listAll`,
    method: 'GET',
  })
}

//条件查询科目
export function lookSubject(subject) {
  return request({
    url: `${prefix}/subject/list`,
    method: 'GET',
    params: subject,
  })
}

//添加一条科目
export function insertOneSubject(subject) {
  return request({
    url: `${prefix}/subject`,
    method: 'POST',
    data: subject,
  })
}

//修改科目
export function updateOneSubject(subject) {
  return request({
    url: `${prefix}/subject`,
    method: 'PUT',
    data: subject,
  })
}

//删除科目
export function deleteSubject(ids) {
  return request({
    url: `${prefix}/subject`,
    method: 'DELETE',
    data: ids,
  })
}
